import { XAXisComponentOption, YAXisComponentOption } from "echarts"

export const xAxisPart: XAXisComponentOption = {
    nameTextStyle: {
        color: '#666',
    },
    axisLine: {
        show: true,
        symbol: ["none", "none"],
        lineStyle: {
            color: "#EEEEEE",
            width: 1,
        },
    },
    splitLine: {
        // show: true,
        lineStyle: {
            color: "#EEEEEE",
        }
    },
    axisLabel: {
        show: true,
        color: "#666666"

    },
    axisTick: {
        show: false,
    },
}


export const yAxisPart: YAXisComponentOption = {
    nameLocation: 'end',
    nameTextStyle: {
        color: '#999999',
        align: 'right',
        fontSize: 12,
        padding: [0, 10, 0, 0]
    },
    axisLine: {
        show: false,
        symbol: ["none", "none"],
        lineStyle: {
            color: "#EEEEEE",
            width: 1,
        },
    },
    axisLabel: {
        show: true,
        color: "#999999"
    },
    axisTick: {
        show: false,
    },
    splitLine: {
        // show: false,
        lineStyle: {
            color: "#EEEEEE",
            width: 1,
            opacity: 1,
        },
    },
}


export const dataZoomPart = function (maxend = 10) {
    return [{
        start: 0,
        end: maxend,
        bottom: 30,
        borderColor: "#00dbeb",
        fillerColor: "rgba(79,175,248,0.5)",
        backgroundColor: "#021a37",
        dataBackground: {
            lineStyle: {
                color: "rgba(0,0,0,0)",
            },
            areaStyle: {
                color: "rgba(79,175,248,0.3)",
                opacity: 1,
            },
        },
        handleStyle: {
            borderColor: "#00dbeb",
            color: "#00dbeb",
            borderWidth: 2,
        },
        showDetail: false
    },]
}

